package com.multicampus.simplewiki.control.login;

import org.springframework.web.servlet.mvc.SimpleFormController;

import com.multicampus.simplewiki.ctrl.LoginManager;
import com.multicampus.simplewiki.model.User;

public class RegisterUserController extends SimpleFormController {

	LoginManager loginManager;

	public void setLoginManager(LoginManager loginManager) {
		this.loginManager = loginManager;
	}

	@Override
	protected void doSubmitAction(Object command) throws Exception {
		User user = (User) command;
		loginManager.addUser(user);
	}
}
